import request from '@/utils/request'

// 创建快递服务-优惠券
export function createDeliveryCoupon(data) {
  return request({
    url: '/ipark/delivery-coupon/create',
    method: 'post',
    data: data
  })
}

// 更新快递服务-优惠券
export function updateDeliveryCoupon(data) {
  return request({
    url: '/ipark/delivery-coupon/update',
    method: 'put',
    data: data
  })
}

// 删除快递服务-优惠券
export function deleteDeliveryCoupon(id) {
  return request({
    url: '/ipark/delivery-coupon/delete?id=' + id,
    method: 'delete'
  })
}

// 获得快递服务-优惠券
export function getDeliveryCoupon(id) {
  return request({
    url: '/ipark/delivery-coupon/get?id=' + id,
    method: 'get'
  })
}

// 获得快递服务-优惠券分页
export function getDeliveryCouponPage(params) {
  return request({
    url: '/ipark/delivery-coupon/page',
    method: 'get',
    params
  })
}
// 导出快递服务-优惠券 Excel
export function exportDeliveryCouponExcel(params) {
  return request({
    url: '/ipark/delivery-coupon/export-excel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}